StrAdd = InputBox("Please type in the a-keywords to add below." & vbCr & "You can separate the a-keywords with a semicolon:", "Add A-Keyword(s)", Replace$(txtTitle.Text, " ", ";", , , vbTextCompare))
If Len(StrAdd) = 0 Then Exit Sub
AddKeyWords lstFootNotes, StrAdd
Err.Clear
End Sub
Private Sub AddKeyword_Click()
On Error Resume Next
StrAdd = InputBox("Please type in the k-keywords to add below." & vbCr & "You can separate the k-keywords with a semicolon:", "Add K-Keyword(s)", Replace$(txtTitle.Text, " ", ";", , , vbTextCompare))
If Len(StrAdd) = 0 Then Exit Sub
AddKeyWords lstKeywords, StrAdd
Err.Clear
End Sub
Private Sub AddMacro_Click()
On Error Resume Next
StrAdd = InputBox("Please type in the macro to add below.", "Add Macro")
If Len(StrAdd) = 0 Then Exit Sub
If LstViewFindItem(lstMacros, StrAdd, search_Text, search_Whole) = 0 Then
lstMacros.ListItems.Add , , StrAdd
End If
Err.Clear
End Sub
Private Sub cmdCancel_Click()
On Error Resume Next
Unload Me
Err.Clear
End Sub
Private Sub cmdOk_Click()
On Error Resume Next
If boolIsBlank(txtTitle, "topic title") = True Then Exit Sub
If boolIsBlank(txtContextString, "topic context string") = True Then Exit Sub
If boolIsBlank(txtContextNumber, "topic context number") = True Then Exit Sub
Private Sub AddKeyWords(lstKeywords As ListView, ByVal StrKeywords As String)
On Error Resume Next
Dim spKeywords() As String
Dim spTot As Integer
Dim spCnt As Integer
StrKeywords = Replace$(StrKeywords, " ", ";")
spKeywords = Split(StrKeywords, ";")
spTot = UBound(spKeywords)
For spCnt = 0 To spTot
StrAdd = Trim$(spKeywords(spCnt))
If Len(StrAdd) = 0 Then GoTo NextKeyWord
If LstViewFindItem(lstKeywords, StrAdd, search_Text, search_Whole) = 0 Then
lstKeywords.ListItems.Add , , StrAdd
End If
NextKeyWord:
Err.Clear
Next
Erase spKeywords
Err.Clear
End Sub
Public Function LstViewFindItem(lstView As ListView, ByVal StrSearch As String, Optional ByVal SearchWhere As FindWhere = search_Text, Optional SearchItemType As SearchType = search_Whole) As Long
On Error Resume Next
Dim itmFound As ListItem
LstViewFindItem = 0
Set itmFound = lstView.FindItem(StrSearch, SearchWhere, , SearchItemType)
If TypeName(itmFound) = "Nothing" Then
Err.Clear
Exit Function
End If
LstViewFindItem = CLng(itmFound.Index)
Set itmFound = Nothing
Err.Clear
End Function
Public Sub Dao_WriteRecordArray(ByVal Dbase As String, ByVal TableName As String, ByVal TableKey As String, ByVal ValuetoSeek As String, FieldsToRead As Variant, FieldsToWrite As Variant, Optional ByVal Overwrite As Boolean = True)